package com.zju.iotplant.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zju.iotplant.entity.Plant;
import com.zju.iotplant.mapper.PlantMapper;
import com.zju.iotplant.service.PlantService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Yifan Wu
 * Date on 2021/11/15  16:11
 */
@Service
public class PlantServiceImpl extends ServiceImpl<PlantMapper,Plant> implements PlantService {
    @Override
    public List<Plant> getByName(String plantName) {
        List<Plant> plant = baseMapper.selectList(new QueryWrapper<Plant>().eq("plant_name", plantName));
        return plant;
    }
}
